package com.rao.mongodb.explorer.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

/**
 * 短链接实体类
 *
 * @author raos
 * @emil 991207823@qq.com
 * @date 2021/8/31 21:30
 */
@Data
@Document(collection="t_short_url")
public class ShortUrl implements Serializable {

    /** 短Url */
    @Id
    private String shortUrl;
    /** 全url */
    private String url;

    public ShortUrl(){ }

    public ShortUrl(String shortUrl, String url){
        this.shortUrl = shortUrl;
        this.url = url;
    }

}
